In a video coding process, the amount of information is generally compressed utilizing redundancy in a spatial direction or a temporal direction of a video. Here, transform into a frequency domain is generally used as a method utilizing redundancy in a spatial direction. On the other hand, inter picture prediction (hereinafter referred to as inter prediction) is used as a method utilizing redundancy in a temporal direction.
When coding a coding target picture in an inter prediction coding process, a coded picture located forward or backward of the coding target picture in display time order is used as a reference picture. A motion vector is derived from the reference picture by performing motion estimation for the coding target picture. Then, the redundancy in the temporal direction is removed by calculating the difference between the prediction image data obtained by performing motion compensation based on the motion vector and the image data of the coding target picture. Here, in the motion estimation, the value of difference between a coding target block in the coding target picture and each of the blocks in the reference picture is calculated, and the block having the minimum difference value in the reference picture is determined as a reference block. The motion vector is estimated using the coding target block and the reference block.
In the standardized video coding standard called H.264, three types of pictures called I-picture, P-picture, and B-picture are used to compress the amount of information. An I-picture is a picture for which no inter prediction coding process is performed, in other words, for which only intra picture prediction (hereinafter referred to as intra prediction) coding processes are performed. A P-picture is a picture for which inter prediction coding is performed with reference to only a coded picture located forward or backward of a coding target picture in display time order. A B-picture is a picture for which inter prediction coding is performed with reference to two coded pictures each located forward or backward of a coding target picture in display time order.
In addition, the video coding standard called H.264 supports motion vector estimation modes for coding the value of difference between prediction image data and a coding target block and a motion vector used to generate the prediction image data, as coding modes for performing inter prediction on each of coding target blocks in a B-picture. As the motion vector estimation modes, the following directions can be selected: a bidirectional prediction for generating a prediction image with reference to two coded pictures located forward or backward of a coding target picture; and a unidirectional prediction for generating a prediction image with reference to a coded picture located forward or backward of a coding target picture.
In addition, in the video coding standard called H.264, it is possible to select a coding mode called a temporal motion vector predictor mode when deriving a motion vector in coding of a B-picture. The inter prediction coding method in the temporal motion vector predictor mode is described with reference to FIG. 19. FIG. 19 is an illustration of motion vectors in the temporal motion vector predictor mode, and shows a case of coding a block a in a picture B2 using the temporal motion vector predictor mode.
In this case, a motion vector vb which is of a block b co-located with the block a and in the picture P3 is used. The picture P3 is a reference picture located backward of the picture B2. The motion vector vb is a motion vector used in the coding of the block b, and shows reference to a picture P1. The block a is coded by bidirectional prediction using a reference block obtained from the picture P1 which is a forward reference picture and a picture P3 which is a backward reference picture using a motion vector parallel to the motion vector vb. In other words, the motion vectors used in the coding of the block a is a motion vector va1 in relation to the picture P1 and a motion vector va2 in relation to the picture P3.